<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>造一个json</title>
		<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
	</head>
	<body>
		<button onclick="insertCondition()">提交病情</button>
		<button onclick="insertCo_de()">客服分诊,图文</button>
		<button onclick="insertCo_do()">医生接单/答复</button>
		
		
	</body>
	
	<script >
		
		function insertCo_do(){
			
			var co_id = 3;
			var do_id = 1;
			var reply = '你这个病没治了,躺着等死吧';
			
			$.post(
				"https://evekykeb.qcloud.la/CustomerService/diagnosisText",
				{'deids':deids, 'co_id':co_id, 'oppenid':'oi2205H4iT8AwcnoHDh1G6Ha8hPY'}, 
				function(result){
					alert(result);
			})
		}
		
		function insertCo_de(){
			var deids = [2,3];
			var co_id = 3; 
			
			$.post(
				"https://evekykeb.qcloud.la/CustomerService/diagnosisText",
				{'deids':deids, 'co_id':co_id, 'oppenid':'oi2205H	4iT8AwcnoHDh1G6Ha8hPY'}, 
				function(result){
					alert(result);
			})
		}
		
		function insertCondition(){
			var json = new Object;
			json.time_length = "小李";
			json.symptom = "肚子疼,持续不断";
			json.visit_flag = "1";
			json.visit_info = "开了些药.效果不好,维生素b1";
			json.inspect_flag = "1";
			json.inspect_photo = new Array("bq1","bq2","bq3");
			json.inspect_info = "白细胞有点少";
			json.drug_flag = "1";
			json.drug_photo = new Array("cf1","cf2","cf3");
			json.drug_info = "这个水是疼的时候喝一点";
			json.special_flag = "1";
			json.special_info = "我是低血糖";
			json.operation_flag = "1";
			json.operation_info = "前几天喝酒洗过胃";
			// json.radiotherapy_flag = "0";
			// json.radiotherapy_info = "";
			// json.serious_illness_flag = "0";
			// json.serious_illness_info = "";
			// json.woman_flag = 0;
			// json.woman_info = "";
			// json.allergy_flag = 0;
			// json.allergy_info = "";
			// json.demand = "";
			json.service_type = "0";
			json.service_level = "0";
			json.price = "0";
			// json.progress = "0";
			json.cs_id = "10087";
			json.p_id = "10";
			json.u_id = "9";
			json.remark = "第一次测试提交";
		
			
			$.post("https://evekykeb.qcloud.la/condition/add", {"condition":json, 'oppenid':'oi2205H4iT8AwcnoHDh1G6Ha8hPY'}, function(result){
				alert(result);
			});
		}
		
		
		$(function(){
			
			
		});
		
	</script>
</html>
